Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Graphics /
Chapter 4 - Geometric Operations / Geometric Operations Reference
Functions / Determining Whether One Shape Contains Another


GXContainsRectangle

You can use the GXContainsRectangle function to determine if one rectangle contains another.

gxBoolean GXContainsRectangle(const gxRectangle *container, 
                              const gxRectangle *test);
container
A pointer to the rectangle to test as the container.
test
A pointer to the rectangle to test for inclusion.
function result
A Boolean value indicating whether the container rectangle contains
the test rectangle.
DESCRIPTION
The GXContainsRectangle function returns true as its function result if the rectangle specified by the test parameter lies within the rectangle specified by the target parameter, and false otherwise.

This function may return true even if the container and test rectangles share one or more edges. This function returns true when the container and test rectangles are defined by the same coordinates.

Notice that the parameters to this function are not shapes; they are pointers to gxRectangle structures.

ERRORS, WARNINGS, AND NOTICES
Errors
parameter_is_nil
SEE ALSO
For a discussion of the gxRectangle data structure, see Chapter 2, "Geometric Shapes," in this book.

To determine if a rectangle touches a point, use the GXTouchesRectanglePoint function, described on page 4-96.

To determine if a rectangle contains a shape, use the GXContainsBoundsShape function, described in the next section.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help